package com.zyf.pattern.proxy.jdk.error;

import com.zyf.pattern.proxy.jdk.Person;

/**
 * 错误示例
 * Exception in thread "main" java.lang.ClassCastException: com.sun.proxy.$Proxy0
 *  cannot be cast to com.zyf.pattern.proxy.jdk.error.ZhangSan
 * create by yifeng
 */
public class JDKProxyErrorTest {
    public static void main(String[] args) throws Exception {
        /*

         */
        Person instance = (Person) new JDKMeipo().getInstance(new ZhangSan());
        System.out.println("代理类" + instance.getClass());
        instance.findLove();


    }
}
